//package cn.edu.xmu.oomall.aftersales.service.mq;
//
//import cn.edu.xmu.oomall.aftersales.dao.AfterSaleDao;
//import cn.edu.xmu.oomall.aftersales.model.bo.AfterSale;
//import org.apache.rocketmq.spring.annotation.ConsumeMode;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
///**
// * @author Jiawei Zheng
// * @date 2021-12-11
// */
//@Service
//@RocketMQMessageListener(topic = "service-pay-topic", consumeMode = ConsumeMode.CONCURRENTLY, consumerGroup = "aftersales-group")
//public class AfterSalePayConsumer implements RocketMQListener<AfterSaleMessageBody> {
//
//    @Autowired
//    private AfterSaleDao afterSaleDao;
//
//    @Override
//    public void onMessage(AfterSaleMessageBody afterSaleMessageBody) {
//        AfterSale bo = new AfterSale();
//        bo.setState(AfterSale.AfterSaleState.WAIT_SHOP_POST);
//        bo.setServiceSn(afterSaleMessageBody.getServiceSn());
//        bo.setPrice(afterSaleMessageBody.getPrice());
//        afterSaleDao.updateAfterSale(null, null, bo);
//    }
//}
